namespace Universal.Application.Repositories;

using Universal.Domain.Entities.App;
using Universal.Domain.Repositories;
using Microsoft.EntityFrameworkCore;
using Universal.Application.Contracts.Common;
using Universal.Application.Contracts.Dto.Role;


/// <summary>
/// 角色服务
/// </summary>
public interface IRoleService
{
    Task<dynamic> CreateRoleAsync(CreateRoleDto createRoleDto);

    Task<dynamic> DeleteRoleAsync(Guid id);

    // 指定角色分配指定权限
    Task<dynamic> AssignPermissionsAsync(Guid roleId, AssignPermissionsDto assignPermissionsDto);

    // 指定角色分配指定菜单
    Task<dynamic> AssignMenusAsync(Guid roleId, AssignMenusDto assignMenusDto);

    // 获取角色分页列表
    Task<ApiResponse<PagedResult<RoleViewDto>>> GetRolesPagedAsync(int pageIndex, int pageSize);

    //启用角色
    Task<dynamic> EnableRoleAsync(Guid id);

    //禁用角色
    Task<dynamic> DisableRoleAsync(Guid id);

    // 角色界面获取所有菜单
    Task<dynamic> GetRoleViewMenuAsync();

    // 角色界面获取所有权限
    Task<dynamic> GetRoleViewpermissionAsync();

    //更新角色信息
    Task<dynamic> UpdateRoleAsync(Guid id, UpdateRoleDto updateRoleDto);

    // 获取角色详情（创建同等字段）
    Task<dynamic> GetRoleByIdAsync(Guid id);

}